<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns="http://www.w3.org/1999/xhtml"
                template="./../../templates/applicationTemplate.xhtml"
                xmlns:rich="http://richfaces.org/rich"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:a4j="http://richfaces.org/a4j"
                xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:define name="title">
        SGA - #{playerManagedBean.editorPanelTitle}
    </ui:define>

    <ui:define name="content">

        <h:form>
            <rich:panel style="overflow: hidden;" id="playerEditor" header="#{playerManagedBean.editorPanelTitle}" >
                <ui:include src="./form.xhtml" >
                    <ui:param name="player" value="#{playerManagedBean.currentlyManagedPlayer}" />
                    <ui:param name="resultListener" value="#{playerManagedBean}" />
                </ui:include>

                <div style="float: right; margin: 5px;" >
                    <a4j:commandButton styleClass="editorActionButton"                                       
                                       value="#{playerManagedBean.editorButtonLabel}" 
                                       action="#{playerManagedBean.handleAction}" />
                    <a4j:commandButton styleClass="editorCancelButton"
                                       value="#{bundle.cancelButton}" 
                                       action="#{playerManagedBean.processActionAndRedirect('VIEW')}"
                                       immediate="true" />
                </div>
            </rich:panel>
        </h:form>
    </ui:define>

</ui:composition>
